
<div class="cards">
    <div class="card blue">
        <div class="fn-left">
            <i class="iconfont icon-renminbi1688"></i>
        </div>
        <div class="fn-right fn-tar">
            <div class="num">{$fund.balance|money}</div>
            <div class="text">采购基金(￥)</div>
        </div>
    </div>
    <div class="card yellow">
        <div class="fn-left">
            <i class="iconfont icon-renminbi1688"></i>
        </div>
        <div class="fn-right fn-tar">
            <div class="num">{$fund.subsidize|money}</div>
            <div class="text">已补贴(￥)</div>
        </div>
    </div>
    <div class="card violet">
        <div class="fn-left">
            <i class="iconfont icon-wodedingdan2"></i>
        </div>
        <div class="fn-right fn-tar">
            <div class="num">{$fund.subsidize_num}</div>
            <div class="text">已补贴(单)</div>
        </div>
    </div>
</div>
<div id="actionbar">
<div class="fn-left">
    {if $types == 2}
        <a href="javascript:;" url="{:url('fund/winCoupon')}" class="button coupon{if $types == 2} button-red{/if}"><i class="iconfont icon-add_icon"></i>增加优惠券关联</a>
    {else}
        <a href="{:url('fund/index',['types'=>0])}" class="button{if $types == 0} button-green{/if}"><i class="iconfont icon-wodedingdan2"></i>基金入账</a>
        <a href="{:url('fund/index',['types'=>1])}" class="button{if $types == 1} button-green{/if}"><i class="iconfont icon-wodedingdan2"></i>补贴出帐</a>
    {/if}
</div>
<div class="fn-right">
    {if $types == 2}
        <a href="{:url('fund/index',['types'=>0])}" class="button button-green"><i class="iconfont icon-wodedingdan2"></i>基金账单</a>
    {else}
        <a href="{:url('fund/index',['types'=>2])}" class="button button-red"><i class="iconfont icon-lianjie"></i>关联优惠券</a>
    {/if}
</div>
</div>
{if $types <= 1}
<table class="pure-table">
<thead>
    <tr>
        <th class="w100 fn-tar"><i class="iconfont icon-renminbi1688"></i>金额</th>
        <th>订单号</th>
        <th class="w160">更新时间</th>
    </tr>
</thead>
<tbody>
    {foreach $bill as $vo}
    <tr>
        <td class="fn-tar"><i class="iconfont icon-renminbi1688"></i>{$vo.money|money}</td>
        <td>{$vo.order_no}</td>
        <td>{$vo->update_time|date='Y-m-d H:i'}</td>
    </tr>
    {/foreach}
</tbody>
</table>
{else}
<table class="table">
    <thead>
        <tr>
            <th class="w60 fn-tac">#</th>  
            <th class="w90 fn-tac">操作</th>
            <th>名称</th>
            <th class="w80 fn-tac fn-fb">补贴价</th>
            <th class="w100 fn-tac">￥额度</th>
            <th class="w80 fn-tac">￥满用</th>
            <th class="w100 fn-tar">抵扣/折扣</th>
            <th class="w200 fn-tac">有效期</th>
            <th>使用规则</th>
            <th class="w140">更新时间</th>
        </tr>
    </thead>
    <tbody>
        {foreach $bill as $vo}
        <tr>
            <td class="fn-tac">{$vo.coupon.id}</td>
            <td><a class="button isDel" url="{:url('fund/delCoupon',['id' => $vo.id])}" href="javascript:;"><i class="iconfont icon-lajixiang"></i>删除</a></td>
            <td>{$vo.coupon.name}</td>
            <td class="red"><input name="sort" class="fn-tac w60 input input-mini" type="text" value="{$vo.how_much}" id="{$vo.id}" /></td>
            <td class="fn-tar">{$vo.coupon.size}元</td>
            <td class="fn-tar">{$vo.coupon.howmuch}元</td>
            <td class="fn-tar">{if $vo.coupon.types}<span class="badge bg-blue">{$vo.coupon.discount}折</span>{else}<span class="badge bg-green">{$vo.coupon.price}元</span>{/if}</td>
            <td class="fn-tac">{$vo.coupon.starttime|date="Y-m-d"} 至 {$vo.coupon.endtime|date="Y-m-d"}</td>
            <td>{$vo.coupon.tips}</td>
            <td>{$vo.coupon.update_time|date='Y-m-d H:i'}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{/if}
<div class="page">{$bill|raw}</div>
<script type="text/javascript">
Do('base', 'layer', function () {
    $('.isDel').isDel();
    $(".coupon").win({reload:1});
    sort("{:url('fund/howmuch')}");
})
</script>